﻿<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <!--[if lt IE 9]>
<script type="text/javascript" src="../lib/html5.js"></script>
<script type="text/javascript" src="../lib/respond.min.js"></script>
<script type="text/javascript" src="../lib/PIE_IE678.js"></script>
<![endif]-->
    <link href="../css/H-ui.min.css" rel="stylesheet" type="text/css" />
    <link href="../css/H-ui.admin.css" rel="stylesheet" type="text/css" />
    <link href="../lib/Hui-iconfont/1.0.1/iconfont.css" rel="stylesheet" type="text/css" />
    <!--[if IE 6]>
<script type="text/javascript" src="../lib/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
    <title>出入库明细管理</title>
    <style type="text/css">
        .auto-style1 {
            width: 40px;
        }
    </style>
</head>
<body>
    <div class="pd-5">
        <div class="text-c" id="findfdiv">
            <span class="select-box" style="width: 150px;">
                <select class="select" size="1" name="finddatastate" id="finddatastate">
                    <option value="">出入库</option>
                    <option value="出库">出库</option>
                    <option value="入库">入库</option>
                </select>
            </span>
            <span class="select-box" style="width: 150px;">
                <select class="select" size="1" name="" id="findendallcount_times">
                    <option value="">所有</option>
                    <option value="0">有库存</option>
                </select>
            </span><span class="select-box" style="width: 150px;">
                <select class="select" size="1" name="finddataisdeleted" id="finddataisdeleted">
                    <option value="0">正常数据</option>
                    <option value="1">已删除的数据</option>
                    <option value="">所有</option>
                </select>
            </span>
            <input type="text" name="finddataaddtime" id="finddataaddtime" style="width: 100px" placeholder="处理日期" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="input-text Wdate" />
            <input type="text" class="input-text" style="width: 100px" placeholder="投入品" id="findspname" name="findspname">
             <input type="text" class="input-text" style="width: 100px" placeholder="仓库" id="findname" name="findname">
            <button onclick="findreolad()" class="btn btn-success radius" id="" name=""><i class="Hui-iconfont">&#xe665;</i> 搜明细</button>
        </div>
        <div class="cl pd-5 bg-1 bk-gray mt-5">
            <span class="l"></span>
            <span class="r">操作提示：<strong>有库存，只对入库的查询有效</strong> </span>

        </div>
        <div class="mt-5 ml-20">
            <table class="table table-border table-bordered table-striped table-hover" id="tablelist" width="100%">
                <thead>
                    <tr class="text-c">
                        <th width="30"><a id="hcmtable_sall" onclick="hcmtable_sall();" href="javascript:;" title="全选反选"><i class="Hui-iconfont">&#xe608;全</i></a></th>
                        <th>分类/仓库</th>
                        <th>名称</th>
                        <th>成本单价</th>
                        <th>数量</th>
                        <th>库存</th>
                        <th>单位</th>
                        <th>厂家</th>
                        <th>资质</th>
                        <th>批次</th>
                        <th>生产日期</th>
                        <th>说明</th>
                        <th>类型</th>
                        <th>任务信息</th> <th>处理时间</th>
                        
                    </tr>
                </thead>
                <tbody>
                </tbody>
            </table>

        </div>
    </div>
    <script src="../hcjsui/Scripts/jquery-1.9.1.min.js" type="text/javascript"></script>
    <script type="text/javascript" src="../lib/layer/1.9.3/layer.js"></script>
    <script type="text/javascript" src="../lib/laypage/1.2/laypage.js"></script>
    <script type="text/javascript" src="../lib/My97DatePicker/WdatePicker.js"></script>
    <script type="text/javascript" src="../lib/datatables/1.10.0/jtable.js"></script>
    <script src="../hcjsui/js/_Define.js" type="text/javascript"></script>
    <script type="text/javascript" src="../js/hcui.js"></script>
    <script type="text/javascript" src="../js/hcui_list.js"></script>
    <script type="text/javascript">
        $(function () {
            spsetBaseNoBt("herp_inoutorderlistView", "id", "herp_inoutorderlistView as T", "*", "#tablelist", "herp_inoutorder", "出入库管理", "StoreInOut");
            hcmtable = $("#tablelist").DataTable({
                "serverSide": true,//服务端处理分页 无法使用当前查找
                "bFilter": false,  //是否使用内置的过滤功能
                "bInfo": true, "fnDrawCallback": function () { dTappendSkipPage(); },
                //"ajax": spselUrl(" and type=20150921"),
                "ajax": {
                    "type": "POST",
                    "url": spselUrl(" and databranchid=" + HCUser.HCUorg) + "&sporderby= dataaddtime desc ",
                    "data": function (d) {
                        $("#findfdiv").find("input[type='text']").each(function () {
                            d[this.id] = $(this).val();
                        });
                        $("#findfdiv").find("select").each(function () {
                            d[this.id] = $(this).val();
                        });
                        if (hcmtable) {
                            console.log(hcmtable);
                            console.log(hcmtable.ajax);
                            console.log(hcmtable.ajax.url);
                        }
                        //$("#hasoutokornot").val()==""
                    }
                },
               // "order": [[1, "desc"]],//默认第几个排序

                aLengthMenu: [10, 20, 50],
                "columns": [
                     { "data": "rowhcindex", "width": "100px" }
        , { "data": "spmaintype", "width": "100px" }
        , { "data": "spname", "width": "100px" }
        , { "data": "price", "width": "100px" }
        , { "data": "count", "width": "100px" }, { "data": "endallcount", "width": "100px" }
        , { "data": "unit", "width": "100px" }, { "data": "spbasecj", "width": "100px" }, { "data": "spbasezj", "width": "100px" },
        { "data": "spbasepc", "width": "100px" }, { "data": "spbasecdate", "width": "100px" }, { "data": "spbasedesc", "width": "100px" }
        , { "data": "state", "width": "100px" }, { "data": "totaskinfo", "width": "100px" },
        { "data": "dataaddtime", "width": "100px" }
        

                ]
                ,
                "columnDefs": [

                 {
                     "targets": [1],
                     "render": function (data, type, row) {
                         if (row.dataisdeleted == 0)
                         { return data + "（" + row .name+ "）"; }
                         else
                         {
                             return data + "（" + row.name + "）";
                         }
                     }
                 },
                 {
                     "targets": [11],
                     "render": function (data, type, row) {
                         if (row.dataisdeleted == 0)
                         { return data + "（正常）"; }
                         else
                         {
                             return data + "（已删除）";
                         }
                     }
                 },

                {
                    "orderable": false,
                    "targets": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
                }]

            });


        });
    </script>
</body>
</html>
